## API Report File for "@backstage/plugin-lighthouse-common"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { Config } from '@backstage/config';

// @public (undocumented)
export type Audit = AuditRunning | AuditFailed | AuditCompleted;

// @public (undocumented)
export interface AuditBase {
  // (undocumented)
  id: string;
  // (undocumented)
  timeCreated: string;
  // (undocumented)
  url: string;
}

// @public (undocumented)
export interface AuditCompleted extends AuditBase {
  // (undocumented)
  categories: Record<LighthouseCategoryId, LighthouseCategoryAbbr>;
  // (undocumented)
  report: Object;
  // (undocumented)
  status: 'COMPLETED';
  // (undocumented)
  timeCompleted: string;
}

// @public (undocumented)
export interface AuditFailed extends AuditBase {
  // (undocumented)
  status: 'FAILED';
  // (undocumented)
  timeCompleted: string;
}

// @public (undocumented)
export interface AuditRunning extends AuditBase {
  // (undocumented)
  status: 'RUNNING';
}

// @public (undocumented)
export class FetchError extends Error {
  // (undocumented)
  static forResponse(resp: Response): Promise<FetchError>;
  // (undocumented)
  get name(): string;
}

// @public (undocumented)
export type FormFactor = 'mobile' | 'desktop';

// @public (undocumented)
export interface LASListRequest {
  // (undocumented)
  limit?: number;
  // (undocumented)
  offset?: number;
}

// @public (undocumented)
export interface LASListResponse<Item> {
  // (undocumented)
  items: Item[];
  // (undocumented)
  limit: number;
  // (undocumented)
  offset: number;
  // (undocumented)
  total: number;
}

// @public (undocumented)
export type LighthouseApi = {
  url: string;
  getWebsiteList: (listOptions: LASListRequest) => Promise<WebsiteListResponse>;
  getWebsiteForAuditId: (auditId: string) => Promise<Website>;
  triggerAudit: (payload: TriggerAuditPayload) => Promise<Audit>;
  getWebsiteByUrl: (websiteUrl: string) => Promise<Website>;
};

// @public (undocumented)
export interface LighthouseCategoryAbbr {
  // (undocumented)
  id: LighthouseCategoryId;
  // (undocumented)
  score: number;
  // (undocumented)
  title: string;
}

// @public (undocumented)
export type LighthouseCategoryId =
  | 'pwa'
  | 'seo'
  | 'performance'
  | 'accessibility'
  | 'best-practices';

// @public (undocumented)
export type LighthouseConfigSettings = {
  formFactor: FormFactor;
  screenEmulation:
    | {
        mobile: boolean;
        width: number;
        height: number;
        deviceScaleFactor: number;
        disabled: boolean;
      }
    | undefined;
  emulatedFormFactor: FormFactor;
};

// @public (undocumented)
export class LighthouseRestApi implements LighthouseApi {
  constructor(url: string);
  // (undocumented)
  static fromConfig(config: Config): LighthouseRestApi;
  // (undocumented)
  getWebsiteByUrl(websiteUrl: string): Promise<Website>;
  // (undocumented)
  getWebsiteForAuditId(auditId: string): Promise<Website>;
  // (undocumented)
  getWebsiteList(options?: LASListRequest): Promise<WebsiteListResponse>;
  // (undocumented)
  triggerAudit(payload: TriggerAuditPayload): Promise<Audit>;
  // (undocumented)
  url: string;
}

// @public (undocumented)
export interface TriggerAuditPayload {
  // (undocumented)
  options: {
    lighthouseConfig: {
      settings: LighthouseConfigSettings;
    };
  };
  // (undocumented)
  url: string;
}

// @public (undocumented)
export interface Website {
  // (undocumented)
  audits: Audit[];
  // (undocumented)
  lastAudit: Audit;
  // (undocumented)
  url: string;
}

// @public (undocumented)
export type WebsiteListResponse = LASListResponse<Website>;
```
